// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 添加新闻 */
export async function createSupport(options) {
  return request<{
    data;
  }>('/api/mjSupportHelp/add', {
    method: 'POST',
    data:(options || {}),
  });
}

/** 删除新闻 */
export async function deleteSupport(options) {
    
    return request<{
      data;
    }>('/api/mjSupportHelp/delete', {
      method: 'GET',
      params:(options || {}),
    });
  }
  
  /** 首页产品详情 */
export async function fetchSupportList(options) {
  console.log(options,'-')
   const result = await request('/api/mjSupportHelp/queryByPage', {
      method: 'POST',
      data: options,
    });
    console.log(result,'result')
    return { data: result.data.records, success: true ,total:result.data.total}
  }
  
  
export async function prOnOff(options) {
    return request<{
      data;
    }>('/api/mjSupportHelp/prOnOff', {
      method: 'GET',
      params:(options || {}),
    });
  }
  export async function updateSupport(options) {
    return request<{
      data;
    }>('/api/mjSupportHelp/edit', {
      method: 'POST',
      data:(options || {}),
    });
  }
/** 产品列表 */

// export async function fetchSupportList() {
//     const res = await  request<{
//         data;
//       }>('/api/mjSupportHelp/queryByPage', {
//         method: 'POST',
//         data:( {}),
//       });
//       return res
    
// }
